﻿{#foreach $T.Items as lstReport}
<tr class="{COMMON.getRowStyle($T.lstReport$index + 1)}">
    <td>
        {$T.lstReport$index + 1}
    </td>
    <td>
        BICC_REP_{$T.lstReport.Department}_{$T.lstReport.ReportCode}
    </td>
    <td style="text-align: left" id="report{$T.lstReport.ReportId}">
        {#if $T.lstReport.RLDescription != ''}
            <a href="javascript:;" class="spanTooltip {COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" title="{$T.lstReport.RLDescription}">{$T.lstReport.ReportName}</a>
        {#else}
            <a class="{COMMON.getStyleByStatus($T.lstReport.StatusComplete)}" href="javascript:;">{$T.lstReport.ReportName}</a>
        {#/if}

        {#if $T.lstReport.Description != null && $T.lstReport.Description != ''}
            <img id="toolTip_{$T.lstReport.ReportId}" style="cursor: pointer; float:right;" class="spanTooltip" title="{$T.lstReport.Description}" src="" />
        {#/if}
    </td>
    <td>
        {#if $T.lstReport.ReportType == "Regular"}        
            {$T.lstReport.Frequency}
        {#else}
            {$T.lstReport.ReportType}
        {#/if}
    </td>
    
    <td style="text-align: center">
        {COMMON.jSonDateToString($T.lstReport.DateExpire, 2)} 
    </td>
    <td>
        {#if $T.lstReport.IsAuto == 1}
            <img src="/images/admin/icon/red.png" title="Auto" />
        {#else}
            <img src="/images/admin/icon/green.png" title="Normal" />
        {#/if}
    </td>
    <td style="text-align: center">
        {#if $T.lstReport.AccountUpload != null}
        {$T.lstReport.AccountUpload}
        {#/if}
    </td>
    <td>
        {#if $T.lstReport.DateUpload != null}            
            {COMMON.jSonDateToString($T.lstReport.DateUpload, 2)}
        {#/if}
    </td>        
    <td style="text-align: center">
        {#if $T.lstReport.StatusComplete == 'On Time'}
            <img title="On Time" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Delay'}
            <img title="Delay" src="" />
        {#elseif $T.lstReport.StatusComplete == 'Pending'}
            <img title="Pending" src="" />            
        {#elseif $T.lstReport.StatusComplete == 'Ongoing'}
            <img title="Ongoing" src="" />            
        {#else}
            {$T.lstReport.StatusComplete}
        {#/if}
    </td>
    <td>
        <a class="aContextFunction" href="javascript:void(0)">Function</a>
        <div class="divContextFunction">
            <ul>
                {#if $T.lstReport.DateUpload == null}
                <li><a href="javascript:void(0)" onclick="page_MemberReport.showPopupUpload({$T.lstReport.ReportId},'{$T.lstReport.IsAuto}')">
                    Upload</a></li>                
                {#else}
                <li><a href="javascript:void(0)" onclick="page_MemberReport.showPopupUpload({$T.lstReport.ReportId},'{$T.lstReport.IsAuto}')">
                    Re Upload</a></li>                
                {#/if}
                {#if $T.lstReport.DateUpload != null}
                <li><a href="javascript:void(0)" onclick="page_MemberReport.download('{$T.lstReport.FileName}','{$T.lstReport.TimeKeyData}');">
                    Download</a></li>
                <li><a title="{$T.lstReport.FileName}" id='copy{$T.lstReport$index + 1}' onclick="page_MemberReport.copy('{$T.lstReport.FileName}')" href="javascript:void(0)">
                    Copy Link</a></li>
                {#/if}
                <li><a href="javascript:void(0)" onclick="page_MemberReport.functionOnItem(4,{$T.lstReport.ReportId})">
                    Comment</a></li>
                <li><a href="javascript:void(0)" onclick="page_MemberReport.functionOnItem(3,{$T.lstReport.ReportId})">
                    Delete</a></li>
            </ul>
        </div>
    </td>
</tr>
{#/for}